﻿@model DocumentGeneration.Models.AssignmentModel

@{
    ViewBag.Title = "Edit";
}

<h2>@ViewBag.Message</h2>

@{
    /* get the edit type from the viewbag */
    string type = ViewBag.Type;

    /* set the right formfields */
    switch (type)
    {
        case "company":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.Name)</td>
                        <td>@Html.TextBoxFor(m => m.Name)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.Address)</td>
                        <td>@Html.TextBoxFor(m => m.Address)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.Postcode)</td>
                        <td>@Html.TextBoxFor(m => m.Postcode)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.City)</td>
                        <td>@Html.TextBoxFor(m => m.City)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.TelephoneNumber)</td>
                        <td>@Html.TextBoxFor(m => m.TelephoneNumber)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.ContactPerson)</td>
                        <td>@Html.TextBoxFor(m => m.ContactPerson)</td>
                    </tr>
                    <tr>
                        <td>@Html.LabelFor(m => m.Email)</td>
                        <td style="width: ">@Html.TextBoxFor(m => m.Email)</td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "motive":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.Motive)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Motive)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "problem":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.ProblemDefinition)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.ProblemDefinition)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "objective":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.Objective)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Objective)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "result":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.Result)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Result)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "baseline":
            <span>Uitgangssituatie aan de hand van:</span>
            <ul>
                <li>Beschikbare noodzakelijke software (indien van toepassing)</li>
                <li>Beschikbare noodzakelijke hardware (indien van toepassing)</li>
                <li>Reeds opgeleverde relevante documenten</li>
                <li>Aanwezige ideeën</li>
            </ul>
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Baseline)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "activities": 
            <span>Werkzaamheden aan de hand van:</span>
            <ul>
                <li>Te hanteren methodieken</li>
                <li>Uit te voeren activiteiten</li>
                <li>Te gebruiken technieken</li>
                <li>Te vermelden nadrukken</li>
            </ul>
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Activities)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "risks":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.RisksAndMeasures)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.RisksAndMeasures)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
        case "products":
            using (Html.BeginForm())
            {
                <table>
                    <tr>
                        <td>@Html.LabelFor(m => m.Products)</td>
                    </tr>
                    <tr>
                        <td>@Html.TextAreaFor(m => m.Products)</td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="Wijzigingen opslaan" /> of <a href="@Url.Action("Index")">keer terug</a></td>
                    </tr>
                </table>
            }
            break;
    }   
}